# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations


class Migration(migrations.Migration):

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Brande',
            fields=[
                ('id', models.AutoField(auto_created=True, serialize=False, primary_key=True, verbose_name='ID')),
                ('name', models.CharField(max_length=10, verbose_name='车的品牌')),
            ],
            options={
                'verbose_name_plural': '车辆品牌',
                'verbose_name': '车辆品牌',
            },
        ),
        migrations.CreateModel(
            name='CarDetail',
            fields=[
                ('id', models.AutoField(auto_created=True, serialize=False, primary_key=True, verbose_name='ID')),
                ('car_model', models.CharField(max_length=5, verbose_name='车型')),
                ('color', models.CharField(max_length=5, verbose_name='颜色')),
                ('age', models.CharField(max_length=10, verbose_name='车龄')),
                ('Transmission_case', models.CharField(max_length=10, verbose_name='变速箱')),
                ('Mileage', models.DecimalField(max_digits=10, decimal_places=2, verbose_name='里程量')),
                ('displacement', models.CharField(max_length=10, verbose_name='排量')),
                ('emission_standard', models.CharField(max_length=10, verbose_name='排放标准')),
                ('fuel_type', models.CharField(max_length=10, verbose_name='燃油类型')),
                ('license_plate_location', models.CharField(max_length=20, verbose_name='车牌所在地')),
                ('drive', models.CharField(max_length=10, verbose_name='驱动类型')),
                ('country', models.CharField(max_length=10, verbose_name='国别')),
                ('car_price', models.DecimalField(max_digits=10, decimal_places=5, verbose_name='二手车价格')),
                ('status', models.IntegerField(choices=[(1, '上线'), (0, '下线')], default=1, verbose_name='状态')),
                ('brande', models.ForeignKey(to='secondcar.Brande', verbose_name='所属的品牌')),
            ],
            options={
                'verbose_name_plural': '车辆属性',
                'verbose_name': '车辆属性',
            },
        ),
        migrations.CreateModel(
            name='CarStyle',
            fields=[
                ('id', models.AutoField(auto_created=True, serialize=False, primary_key=True, verbose_name='ID')),
                ('name', models.CharField(max_length=8, verbose_name='车的种类')),
                ('image', models.ImageField(upload_to='type', verbose_name='车型代表性图片')),
            ],
            options={
                'verbose_name_plural': '车辆类型',
                'verbose_name': '车辆类型',
            },
        ),
        migrations.CreateModel(
            name='Image_detail',
            fields=[
                ('id', models.AutoField(auto_created=True, serialize=False, primary_key=True, verbose_name='ID')),
                ('path', models.ImageField(upload_to='/detail_img', verbose_name='车辆细节图')),
                ('index', models.IntegerField(verbose_name='顺序')),
                ('car_detail', models.ForeignKey(to='secondcar.CarDetail', verbose_name='图片配对的车型')),
            ],
            options={
                'verbose_name_plural': '车辆图片',
                'verbose_name': '车辆图片',
            },
        ),
        migrations.CreateModel(
            name='IndexBanner',
            fields=[
                ('id', models.AutoField(auto_created=True, serialize=False, primary_key=True, verbose_name='ID')),
                ('path', models.ImageField(upload_to='static/banner', verbose_name='图片')),
                ('index', models.IntegerField(verbose_name='展示顺序')),
            ],
            options={
                'verbose_name_plural': '首页轮播图',
                'verbose_name': '首页轮播图',
            },
        ),
        migrations.AddField(
            model_name='cardetail',
            name='style',
            field=models.ForeignKey(to='secondcar.CarStyle', verbose_name='所属的类型'),
        ),
    ]
